package com.sn.core.util.pub.exception;

/**
 * 统一异常处理
 * Created by qingshengzheng on 15/11/18.
 */
public class ServiceException extends RuntimeException {

    private ExceptionEnums exceptionEnums;

    public ServiceException(ExceptionEnums exceptionEnums) {
        this.exceptionEnums = exceptionEnums;
    }

    public String getCode() {
        return exceptionEnums.getCode();
    }

    public String getMessage() {
        return exceptionEnums.getMessage();
    }
}
